//
//  TextTableViewController.m
//  OCfrist
//
//  Created by 宋 on 15/11/16.
//  Copyright © 2015年 宋. All rights reserved.
//

#import "TextTableViewController.h"
#import "ViewController.h"
#import "TableViewController.h"
#import "Test2ViewController.h"
@interface TextTableViewController ()
{
    NSArray * Data;
}
@end

@implementation TextTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    Data = @[
             @[@"家庭住址:",@"湖南省永州市"],
             @[@"电话号码:",@"15200411916"]
             ];
    self.navigationItem.rightBarButtonItem = self.editButtonItem;
    self.title = @"详细信息";
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return Data.count;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return [Data[section] count];
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:nil];
    UITextField *tf = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 200, 44)];
    tf.text = Data[indexPath.section][indexPath.row];
    [cell.contentView addSubview:tf];
   
    
    return cell;
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
